/**
 * Created by kule on 2017/7/3.
 */
import set from 'lodash/set';
import {flatObj,flatObjWithEnd,flatObjSafe} from './flatObj';
export const mergeSet=function(data,map){
    const _map=flatObj(map);
    for(let k in _map){
        set(data,k,_map[k]);
    }
    return data;
};
export const mergeSetWithEnd=function(data,map){
    const _map=flatObjWithEnd(map);
    for(let k in _map){
        set(data,k,_map[k]);
    }
    return data;
};
export const mergeSetSafe=function(data,map){
    const _map=flatObjSafe(map);
    for(let k in _map){
        set(data,k,_map[k]);
    }
    return data;
};

export default mergeSet;